home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML 2.0 Sourcebook (2nd Edition)
/
VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso
/
book
/
mac
/
ch10
/
10fig12.wrl
< prev
Wrap
Text File
|
1996-09-23
|
1KB
|
51 lines
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright 1997 By
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
children [
# Moving box
DEF Cube Transform {
children Shape {
appearance Appearance {
material Material {
diffuseColor 1.0 1.0 0.0
}
}
geometry Box { size 1.0 1.0 1.0 }
}
},
# Animation clock
DEF Clock TimeSensor {
cycleInterval 4.0
loop TRUE
},
# Animation controller
DEF CubeController ScalarInterpolator {
key [ 0.0, 0.5, 1.0 ]
keyValue [ 0.0, 1.0, 0.0 ]
},
# Animation path
DEF CubePath PositionInterpolator {
key [
0.00, 0.11, 0.17, 0.22,
0.33, 0.44, 0.50, 0.55,
0.66, 0.77, 0.83, 0.88,
0.99
]
keyValue [
0.0 0.0 0.0, 1.0 1.96 1.0,
1.5 2.21 1.5, 2.0 1.96 2.0,
3.0 0.0 3.0, 2.0 1.96 3.0,
1.5 2.21 3.0, 1.0 1.96 3.0,
0.0 0.0 3.0, 0.0 1.96 2.0,
0.0 2.21 1.5, 0.0 1.96 1.0,
0.0 0.0 0.0
]
}
]
}
ROUTE Clock.fraction_changed TO CubeController.set_fraction
ROUTE CubeController.value_changed TO CubePath.set_fraction
ROUTE CubePath.value_changed TO Cube.set_translation